You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Freebuff cloud user reported that commits shown in the Git tab after pushing use the original prompt text as the commit description instead of a meaningful summary of the actual project changes. The attached screenshot showed prompt-derived commit titles such as Freebuff: Add this below the AI instructions... and Before: When committing changes....
Implementation
Added summarizeGitChangesForCommit, a deterministic shared helper that builds concise commit titles from git status/diff paths instead of user prompt text.
Covered the reported case with a unit test: modified AGENTS.md plus new CHANGELOG.md now summarizes as Update AI agent instructions and add changelog.
Strengthened the commit tool guide so agent-created commits explicitly base title/body on actual git status/diff and never copy/truncate the original prompt.
Updated the example git-committer agent instructions to follow the same rule.
Validation
bun test common/src/util/__tests__/git-commit-summary.test.ts
cd common && bun run typecheck
git diff --check
Confidence
Ready for review. The exact cloud Git-tab route is not present in this public snapshot, so this PR places the fix in shared code and the commit-generation contract that cloud/private code can call or inherit. The covered behavior directly matches the user report and prevents prompt-only summaries in the shared agent commit path.
The prompt-string edits in run-terminal-command.ts and 02-intermediate-git-committer.ts are sensible, low-risk clarifications telling the agent to derive commit messages from git status/diff rather than the user's prompt. Those are fine as-is and easy to port.
The core of the PR, summarizeGitChangesForCommit in common/src/util/git-commit-summary.ts, is the problem. It's 175 lines of new logic plus 40 lines of tests, but nothing in this diff calls it — it's exercised only by its own test file. The PR description confirms this directly: "The exact cloud Git-tab route is not present in this public snapshot, so this PR places the fix in shared code... that cloud/private code can call or inherit." That means this doesn't actually fix the reported bug (prompt text showing up as commit titles in the cloud Git tab); it's a speculative function sitting in common/src/util/ waiting for something to call it, which nothing here does. The reported issue is almost certainly in the push/commit-summary path used by cloud, not in the agent's run_terminal_command git-commit flow this PR touches — those are two different mechanisms (one is an LLM writing a commit message via the tool prompt, the other is presumably a non-LLM summary generated at push time).
As it stands, a maintainer porting this would get dead code with no call site, plus two small prompt tweaks that may or may not be relevant to the actual bug. I'd split this: drop the unused helper/tests, or find the actual call site in the private repo and wire it in with a real integration point and test that exercises the actual bug path, not a synthetic one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bot:triagedClassified by the community triage botpr:needs-workRight idea, not mergeable as written
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User request
A Freebuff cloud user reported that commits shown in the Git tab after pushing use the original prompt text as the commit description instead of a meaningful summary of the actual project changes. The attached screenshot showed prompt-derived commit titles such as
Freebuff: Add this below the AI instructions...andBefore: When committing changes....Implementation
summarizeGitChangesForCommit, a deterministic shared helper that builds concise commit titles from git status/diff paths instead of user prompt text.AGENTS.mdplus newCHANGELOG.mdnow summarizes asUpdate AI agent instructions and add changelog.Validation
bun test common/src/util/__tests__/git-commit-summary.test.tscd common && bun run typecheckgit diff --checkConfidence
Ready for review. The exact cloud Git-tab route is not present in this public snapshot, so this PR places the fix in shared code and the commit-generation contract that cloud/private code can call or inherit. The covered behavior directly matches the user report and prevents prompt-only summaries in the shared agent commit path.